package cn.kgc.feign;

import cn.kgc.grace.result.GraceJSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author YC
 * 注解@FeignClient(name = "work-service", path = "/resume")通过openfeign组件调用远程服务   name：调用远程服务的名称 path：调用远程服务的路径
 */
@FeignClient(name = "work-service", path = "/resume")
public interface ResumeFeignClient {

    /**
     * 调用初始化简历接口
     *
     * @param userId 用户ID
     * @return 封装对象
     */
    @PostMapping("/init")
    GraceJSONResult initResume(@RequestParam("userId") String userId);

    /**
     * 调用将简历信息刷新到ES接口
     *
     * @param resumeId 简历ID
     * @param userId   用户ID
     * @return 封装对象
     */
    @PostMapping("/refreshResume")
    GraceJSONResult refreshResume(@RequestParam("resumeId") String resumeId,
                                  @RequestParam("userId") String userId);

}
